﻿using Colorful.CMS.Core;
using Colorful.Database;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Colorful.CMS
{
    public static class DbHelper
    {
        #region 获取数据库接口
        public static DbContext GetDb(string database = "")
        {
            if (string.IsNullOrEmpty(database))
                database = DbSetting.Database;
            return new DbContext(DbSetting.ConnectionString, database);
        }
        #endregion
    }
}
